import pickle

d=dict(name='画手',age=20,score=198)
print(pickle.dumps(d))
#将内存中变量信息保存到文件中
with open('廖雪峰python网站\IO编程\dump.txt','wb') as f:
    pickle.dump(d,f)
#将文件中的变量读到内存中来
with open('廖雪峰python网站\IO编程\dump.txt','rb') as f:
    dir=pickle.load(f)
print(dir)
